home *** CD-ROM | disk | FTP | other *** search
- DECLARE SUB NumbersMenu (boxstyle%, tr%, lc%, fc%, bc%)
- CLS
- PRINT STRING$(2080, 219)
- NumbersMenu 5, 5, 40, 1, 14
- ' │ │ │ │ └───┐
- ' boxstyle%─┘ tr% lc% └─fc% bc%
-
- ' ──────────────────────────────────────────
- ' Boxstyle:
- ' There are five choices of boxstyles (Press F 3 on the Tools Menu
- ' to see what they look like.)
- ' ──────────────────────────────────────────
- ' Tr%:
- ' Location of row for first line of box. (Placing longer menus below
- ' rows 12 to 16 will cause them not to properly appear on the screen.)
- ' ──────────────────────────────────────────
- ' Lc%:
- ' Location of first column for first line of box. (Menus are 25 columns
- ' wide, placing them near the edge of the screen at column 55 or greater
- ' will cause distortion.)
- ' ──────────────────────────────────────────
- ' Fc%:
- ' Foreground color (Pick any color from 1 to 15)
- ' ──────────────────────────────────────────
- ' Bc%:
- ' Background color (Pick any color from 1 to 15)
-
- SUB NumbersMenu (boxstyle%, tr%, lc%, fc%, bc%)
- DIM menu$(0 TO 11)
- COLOR fc%, bc%
- SELECT CASE boxstyle%
- CASE 1
- side$ = "│"
- LOCATE tr%, lc%: PRINT "┌───────────────────────┐"
- LOCATE tr% + 11, lc%: PRINT "└───────────────────────┘"
- CASE 2
- side$ = "║"
- LOCATE tr%, lc%: PRINT "╔═══════════════════════╗"
- LOCATE tr% + 11, lc%: PRINT "╚═══════════════════════╝"
- CASE 3
- side$ = "║"
- LOCATE tr%, lc%: PRINT "╓───────────────────────╖"
- LOCATE tr% + 11, lc%: PRINT "╙───────────────────────╜"
- CASE 4
- side$ = "│"
- LOCATE tr%, lc%: PRINT "╒═══════════════════════╕"
- LOCATE tr% + 11, lc%: PRINT "╘═══════════════════════╛"
- CASE 5
- side$ = "█"
- LOCATE tr%, lc%: PRINT STRING$(25, 219)
- LOCATE tr% + 11, lc%: PRINT STRING$(25, 219)
- END SELECT
- FOR set = 1 TO 10
- LOCATE set + tr%, lc%: PRINT side$; SPACE$(23); side$
- NEXT
- menu$(1) = side$ + " 1 QUICKBASIC " + side$ 'spacing for menu items
- menu$(2) = side$ + " 2 POWERBASIC " + side$
- menu$(3) = side$ + " 3 VISUAL BASIC " + side$
- menu$(4) = side$ + " 4 TRUE BASIC " + side$
- menu$(5) = side$ + " 5 GW BASIC " + side$
- menu$(6) = side$ + " 6 Z BASIC " + side$
- menu$(7) = side$ + " 7 VB FOR DOS " + side$
- menu$(8) = side$ + " 8 GFA BASIC " + side$
- menu$(9) = side$ + " 9 LIBERTY BASIC " + side$
- menu$(10) = side$ + " 0 EXIT PROGRAM " + side$
- FOR set = 0 TO 11
- LOCATE set + tr%, lc%: COLOR fc%, bc%: PRINT menu$(set)
- NEXT
- DO
- DO
- key$ = INKEY$
- LOOP WHILE key$ = ""
- keymove = ASC(RIGHT$(key$, 1))' intrprets scancodes from key press
- SELECT CASE keymove ' edit out END in the cases and place in your own code
- CASE 49: END ' ASCII code for 1
- CASE 50: END ' " " " 2
- CASE 51: END ' " " " 3
- CASE 52: END ' etc.
- CASE 53: END
- CASE 54: END
- CASE 55: END
- CASE 56: END
- CASE 57: END
- CASE 48: END ' this line might seem to be out of place but 48 is the ASCII
- END SELECT ' code for 0, which is being used as an exit from the menu
- LOOP
- END SUB
-
-